package com.example.hotdog.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.*;

public class ObjectToList {

    public static <T> List<T> objToList(Object obj, Class<T> cla){
        List<T> list = new ArrayList<T>();

            for (Object o : (List<?>) obj) {
                list.add(cla.cast(o));
            }
            return list;

    }



}

